<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <div class="circle">1</div>
   <div class="circle">2</div>
   <div class="circle">3</div>
   <div class="circle">4</div>
   <div class="circle">5</div>
   <div class="circle">6</div>
   <div class="circle">7</div>
   <div class="circle">8</div>
   <div class="circle">9</div>
   <div class="circle">10</div>
   <div class="circle">11</div>
   <div class="circle">12</div>
   <div class="circle">13</div>
   <div class="circle">14</div>
   <div class="circle">15</div>
   <div class="circle">16</div>
   <div class="circle">17</div>
   <div class="circle">18</div>
   <div class="circle">19</div>
   <div class="circle">20</div>
   <div class="circle">21</div>
    <style>
        .circle{
            width:50px;
            height:50px;
            border-radius:50%;
            line-height: 50px;
            text-align: center;
            display: inline-block;}
        .circle:nth-child(2n+1){
            background-color: red;
        }
        .circle:nth-child(2n){
            background-color: black;
        }    
        div{
            border: 2px gray;
        }
    </style>
</body>
</html>